{% extends 'admin_base/base.html' %}

{% block title %}<title>系统状态</title>{% end %}

{% block body %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
  <h1 class="page-header">信息总览</h1>
  <div class="row placeholders">
    <div class="col-xs-6 col-sm-3 placeholder">
      <h4>文章</h4>
      <span class="text-muted">{{project_count}}条</span> </div>
    <div class="col-xs-6 col-sm-3 placeholder">
      <h4>评论</h4>
      <span class="text-muted">{{comment_count}}条</span> </div>
    <div class="col-xs-6 col-sm-3 placeholder">
      <h4>友链</h4>
      <span class="text-muted">{{flink_count}}条</span> </div>
    <div class="col-xs-6 col-sm-3 placeholder">
      <h4>博客</h4>
      <span class="text-muted">{{blog_count}}</span> </div>
  </div>
  <h1 class="page-header">状态</h1>
  <div class="table-responsive">
    <table class="table table-striped table-hover">
      <tbody>
        <tr>
          <td>登录者: <span>{{current_user.name}}</span>，这是您第 <span>{{users.loginnum}}</span> 次登录</td>
        </tr>
        <tr>
          <td>上次登录时间:{{users.last_login}} 登陆IP:{{remote_ip}}</td>
        </tr>
      </tbody>
    </table>
  </div>
  <h1 class="page-header">系统信息</h1>
  <div class="table-responsive">
    <table class="table table-striped table-hover">
      <thead>
        <tr> </tr>
      </thead>
      <tbody>
        <tr>
          <td>管理员个数:</td>
          <td>{{admin_count}}人</td>
          <td>服务器软件:</td>
          <td>Apache/2.4.10 (Win32) OpenSSL/1.0.1i mod_fcgid/2.3.9</td>
        </tr>
        <tr>
          <td>浏览器:</td>
          <td>Chrome47</td>
          <td>PHP版本:</td>
          <td>5.6.1</td>
        </tr>
        <tr>
          <td>操作系统:</td>
          <td>Windows 10</td>
          <td>PHP运行方式:</td>
          <td>CGI-FCGI</td>
        </tr>
        <tr>
          <td>登录者IP:</td>
          <td>{{remote_ip}}</td>
          <td>MYSQL版本:</td>
          <td>5.5.40</td>
        </tr>
        <tr>
          <td>程序版本:</td>
          <td class="version">miazhenCMS 2.0</td>
          <td>上传文件:</td>
          <td>可以 <font size="-6" color="#BBB">(最大文件：2M ，表单：8M )</font></td>
        </tr>
        <tr>
          <td>程序编码:</td>
          <td>UTF-8</td>
          <td>当前时间:</td>
          <td><span id="show-time"></span></td>
        </tr>
      </tbody>
      <tfoot>
        <tr></tr>
      </tfoot>
    </table>
  </div>
  <footer>
    <h1 class="page-header">程序信息</h1>
    <div class="table-responsive">
    <table class="table table-striped table-hover">
      <tbody>
        <tr>
          <td><span style="display:inline-block; width:8em">版权所有</span> POWERED BY MZ ALL RIGHTS RESERVED</td>
        </tr>
        <tr>
          <td><span style="display:inline-block;width:8em">页面加载时间</span> PROCESSED IN 1.0835s  SECONDS</td>
        </tr>
      </tbody>
    </table>
    </div>
  </footer>
</div>
</div>
</section>
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script type="text/javascript">
	$(function(){
		setInterval("getTime();",1000); //每隔一秒运行一次
	});
	//取得系统当前时间
	function getTime(){
		var myDate = new Date();
		var date = myDate.toLocaleDateString();
		var hours = myDate.getHours();
		var minutes = myDate.getMinutes();
		var seconds = myDate.getSeconds();
		$('#show-time').html(date+" "+hours+":"+minutes+":"+seconds); //将值赋给div
	}
</script>
{% end %}

{% block end %}
{% end %}